{% extends "base.html" %}
 

{% block head %}
    <title>执行脚本</title>
{% endblock %} 

{% block content %}
            <!-- content start -->
                    <form class="form-horizontal" action="/runnow/" method="post" style="margin-top:20px;text-align:left;">
                        <div class="form-group clearfix ">
                            <label class="col-sm-3 control-label bk-lh30 pt0">选择服务器：</label>
                            <div class="col-sm-9">
                                <select name="ip" id="" class="form-control bk-valign-top">
                                    <option value="49.234.187.88">腾讯Server</option>
                                    <option value="121.37.171.107">华为Server</option>
                                </select>
                            </div>
                        </div>
                         <div class="form-group clearfix ">
                            <label class="col-sm-3 control-label bk-lh30 pt0">选择脚本：</label>
                            <div class="col-sm-9">
                                <select name="scontent" id="" class="form-control bk-valign-top">
                                    {% for res in res_list %}
                                    <option value="{{res.content}}">{{res.s_name}}</option>
                                    {%endfor%}
                                </select>
                            </div>
                         <label class="col-sm-3 control-label bk-lh30 pt0"></label>
                            <div class="col-sm-9">
                                <textarea name="content" class="form-control bk-valign-top" rows="15" placeholder="" >{{content}}</textarea>
                            </div>
                            <div class="col-sm-9 col-sm-offset-3">
                                <button type="submit" class="king-btn mr10  king-success">立即执行</button>
                                <button type="button" class="king-btn king-default ">取消</button>
                            </div>
                        </div>
                    </form>
                    <!--显示执行结果-->
                    <div style="white-space: pre-line;text-align:left;margin-left:10px;background:black;color:green;font-size:20;">
                    {{result}}
                    </div>

            <!-- content end -->
{%endblock%}